package com.itheima.test.test1.callable;

import java.util.concurrent.Callable;
//实现了callable接口
public class MyCallable implements Callable<String>{
//重写call方法,其中返回值的类型和接口类型是一样的
    @Override
    public String call() throws Exception {
        for (int i = 0; i < 20; i++) {
            System.out.println("表白了"+i);
        }
        return "滚蛋";
    }
}
